<template>
  <div class="mini-chart">
    <div class="chart-content" :style="{height: 88}">
      <v-chart :force-fit="true" :height="height" :data="coverList" :padding="[16, 5, 20, 15]">
        <v-tooltip/>
        <v-smooth-area position="x*CH4"/>
      </v-chart>
    </div>
  </div>
</template>

<script>

const tooltip = [
  'x*CH4',
  (x, CH4) => ({
    name: x,
    value: CH4
  })
]

const scale = [{
  dataKey: 'x',
  min: 2
}, {
  dataKey: 'CH4',
  title: '时间',
  min: 1,
  max: 22
}]

export default {
  name: 'MiniArea',
  props: ['mylist'],
  data() {
    return {
      // data,
      scale,
      tooltip,
      height: 150,
      coverList: this.mylist,
    }
  },
  methods: {},

}
</script>

<style scoped>
.mini-chart {
  position: relative;
  width: 100%;
}

.mini-chart .chart-content {
  position: absolute;
  bottom: -28px;
  width: 100%;
}
</style>
